#ifndef BMEMALLOCATORS_H
#define BMEMALLOCATORS_H

#include <cstddef>

class BMemAllocatorS
{
private:
    struct BMemAllocatorSRep
    {
        unsigned long id;
        char type;
    };

public:
    static void *operator new(size_t size);
    static void operator delete(void *);

private:
    union
    {
        BMemAllocatorSRep rep;
        BMemAllocatorS *next;
    };

private:
    static BMemAllocatorS *headofFreeList;
    static const int nBSize;
};

BMemAllocatorS* BMemAllocatorS::headofFreeList = nullptr;
const int BMemAllocatorS::nBSize = 512;

#endif // BMEMALLOCATORS_H
